﻿using System;
using System.Diagnostics;
using Debug = UnityEngine.Debug;

namespace UnityModule
{
    /// <summary>
    /// 日志工具集。
    /// 该日志类为了方便外部使用,不遵守命名规则
    /// </summary>
    public static class P
    {
        private const string UNITY_EDITOR = "UNITY_EDITOR";
        private const string USE_LOG = "USE_LOG";

        /// <summary>
        /// Debug
        /// </summary>
        /// <param name="message"></param>
        [Conditional(UNITY_EDITOR), Conditional(USE_LOG)]
        public static void D(object message)
        {
            Debug.Log(message);
        }

        [Conditional(UNITY_EDITOR), Conditional(USE_LOG)]
        public static void W(object message)
        {
            Debug.LogWarning(message);
        }

        [Conditional(UNITY_EDITOR), Conditional(USE_LOG)]
        public static void E(object message)
        {
            Debug.LogError(message);
        }
        
    }
}
